package com.ldn.server.manage.config;

import com.mybatisflex.core.table.DynamicTableProcessor;
import com.mybatisflex.core.table.TableManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * MybatisFlex 的所有配置文件都在此处
 *
 * @author 李大牛家的牛 (scafel@163.com)
 * @product serverless
 * @className MybatisFlexConfig
 * @createDate 2025/3/5 - 9:16
 * @description MybatisFlex 的所有配置文件都在此处
 **/
@Slf4j
@Configuration
public class MybatisFlexConfig {

    @Bean
    public DynamicTableProcessor dynamicTableProcessor(){
        return new DynamicTableProcessor() {
            @Override
            public String process(String tableName) {
                log.info("process: tableName={}", tableName);
                return tableName;
            }
        };
    }

}
